package com.mini.handler;

import com.mini.MiniRowProcessor;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

public class MiniMapListHandler extends MiniAbstractListHandler<Map<String,Object>> {

    private final MiniRowProcessor convert;

    public MiniMapListHandler() {
        this(ROW_PROCESSOR);
    }
    public MiniMapListHandler(MiniRowProcessor rowProcessor){
        convert = rowProcessor;
    }

    @Override
    public Map<String, Object> handleRow(ResultSet resultSet) throws SQLException {
        return convert.toMap(resultSet);
    }
}
